package cn.wen.yaling.xo.dao;

import cn.wen.yaling.commons.entity.MenuEntity;
import cn.wen.yaling.commons.vo.ChildNar;
import cn.wen.yaling.commons.vo.NavigationBarVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Collection;
import java.util.List;

/**
 * 
 * 
 * @author FY
 * @email 932043654@qq.com
 * @date 2022-08-13 02:07:37
 */
@Mapper
@Component
public interface MenuDao extends BaseMapper<MenuEntity> {

    /**
     * 获取菜单栏列表
     * @return
     */
    List<NavigationBarVO> menuListByPriority();

    /**
     * 获取
     * @return
     */
    List<ChildNar> listSubjectByPriority();

    /**
     * 通过ids获取文章数量
     * @param ids
     * @return
     */
    Collection<MenuEntity> listByIds(List<Integer> ids);

    /**
     * 通过角色Id 和等级获取数据
     * @param roleId
     * @return
     */
    List<MenuEntity> getMenuByRoleId(@Param("roleId") Integer roleId);
}
